package io.renren.modules.generator.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.generator.dao.MBlogDao;
import io.renren.modules.generator.entity.MBlogEntity;
import io.renren.modules.generator.service.MBlogService;

@Service("mBlogService")
public class MBlogServiceImpl extends ServiceImpl<MBlogDao, MBlogEntity> implements MBlogService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<MBlogEntity> page = this.page(new Query<MBlogEntity>().getPage(params),
                new QueryWrapper<MBlogEntity>().orderByDesc("created"));

        return new PageUtils(page);
    }

}